package com.demo;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * <p>
 * <code>HashMapTest</code>
 * </p>
 *
 * @author junbao3
 * TODO
 * @date 2023-05-24 15:05
 * Copyright (C) 2021 IFlyTek. All rights reserved.
 */
public class HashMapTest {
    public static void main(String[] args) {
        HashMap<String,String> map = new HashMap<String, String>();
        String string = map.put("123", "2");
        System.out.println(string);
        String string1 = map.put("123", "3");
        System.out.println(string1);
        map.get("123");


        HashMapTest[] array = new HashMapTest[2];
        array[0] = new HashMapTest();


        ArrayList arrayList = new ArrayList();
        arrayList.add("111");
        arrayList.add(1,"111");


        System.out.println("12222".hashCode());
        System.out.println("----------------------");

        System.out.println(Integer.highestOneBit(10));//8
        System.out.println(Integer.highestOneBit(16));//16
        System.out.println(Integer.highestOneBit(6));//4
    }
}
